RichTextKit v0.4

UndoManager<T> Class

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit.Utils

Implements an manager for undo operations

public class UndoManager<T>

Inheritance

UndoManager<T> → object

Type Parameters

T

A context object type (eg: document type)

Constructors

UndoManager(T)

Constructs a new undo manager

Properties

CanRedo

Check if can redo

CanUndo

Check if can undo

IsModified

Checks if the document is currently modified

RedoDescription

Gets the description of the next redo operation

UndoDescription

Gets the description of the next undo operation

Methods

Clear()

Clear and reset the undo manager

CloseGroup()

Ends the current group operation

Do(UndoUnit<T>)

Execute an undo unit and add it to the manager

GetRedoUnit()

Retrieves the unit that would be executed on Redo

GetUndoUnit()

Retrieves the unit that would be executed on Undo

GetUnsealedUnit()

Get the current unsealed unit

MarkUnmodified()

Mark the document as currently unmodified

OnEndOperation()

Notifies that an operation (or group of operations) has finished

OnModifiedChanged()

Notifies when the modified state of the document changes

OnStartOperation()

Notifies that an operation (or group of operations) is about to start

OpenGroup(string)

Stars a group operation

OpenGroup(UndoGroup<T>)

Stars a group operation

Redo()

Redoes previously undone operations

Seal()

Seals the last item to prevent changes

Undo()

Undoes the last performed operation

Events

EndOperation

Event fired when any operation (or group of operations) ends

ModifiedChanged

Fired when the modified state of the document changes

StartOperation

Event fired when any operation (or group of operations) starts